package main

import "fmt"

func Process(nums []int, f1 func(b int) int) []int {
	var newArray []int
	for _, num := range nums {
		newArray = append(newArray, f1(num))
	}
	return newArray
}

func main() {
	a := []int{1, 2, 3, 4}
	doSomething := func(b int) int {
		b += 10
		return b
	}
	fmt.Println(Process(a, doSomething))
	/*
		[11 12 13 14]
	*/
}
